<?php
return [
    'name'      => 'sdk',
    'db'        => include(__DIR__ . '/data/config/db.php'),
    'copyright' => "/*
不要手动修改
*/\r\n",
    'platform'  => [
        'android' => [
            'dist'    => '/tools/sdk/android',
            'package' => 'com.baili.api',
        ],
        'ios'     => [
            'dist' => '/tools/sdk/ios'
        ],
    ],
    'tables'    => [
        'ad_app'       => ['adclicktype', 'cateid', 'productid', 'html', 'keywords'],
        'article'      => ['url'],
        'cart'         => ['item_title', 'item_img'],
        'item'         => [
            'item_cate'                                => '/item_cate',
            'item_img?'                                => '/item_img',
            'is_like', 'after_service_info', 'storage_label', 'days_label',
            'cart_num', 'remain_stock', 'service_list?' => 'String',
        ],
        'item_sku'     => ['prices'],
        'item_cate'    => ['items?' => '/item_cate'],
        'item_comment' => [
            'user' => '/user'
        ],
        'member'       => [
            'hot_item' => '@hot_item',
            'items?'   => '/item',
            'is_member_favs',
        ],
        'order'        => [
            'trade_no',
            'items?'  => '/order_item',
            'invoice' => '/order_invoice',
            'user'    => '/user',
            'order_item_count'
        ],
        'order_item'   => [
            'item_img', 'item_title', 'item_price',
        ],
        'quan'         => ['is_open', 'abst'],
        'user_favs'    => [
            'item' => '/item'
        ],
        'user'         => ['is_qq_bind', 'is_weixin_bind', 'is_weibo_bind', 'token', 'order_fukuan', 'order_fahuo', 'order_shouhuo', 'user_img'],
    ],
    'modules'   => [
        'ad_item'              => ['adclicktype', 'add_time', 'app_type'],
        'ali_pay_result'       => ['orderString'],
        'cartListByMember'     => ['mid', 'mname', 'amount', 'item_list?' => '/cart'],
        'cartUpdateParams'     => ['item_id', 'nums', 'attr', 'price'],
        'hot_item'             => ['id', 'title', 'img', 'price'],
        'index_cate_list'      => ['text', 'url'],
        'member_shop_cate'     => ['id', 'name', 'img'],
        'get_order_fee_params' => ['nums', 'item_id'],
        'pageInfo'             => [
            'page', 'perPage', 'totalPage'
        ],
        'pageParams'           => [
            'page', 'perPage', 'order', 'order_by'
        ],
        'price_list'           => ['min', 'max'],
        'SESSION'              => [
            'uid', 'token', 'username', 'member_type'
        ],
        'wx_pay_result'        => ['appid', 'noncestr', 'package', 'partnerid', 'prepayid', 'sign', 'signstr', 'timestamp'],
    ],
    'api'       => [
        'ad/lists'             => [
            'request'  => ['board_id'],
            'response' => ['list?' => '/ad', '@pageInfo']
        ],
        'article/get'          => [
            'request'  => ['id'],
            'response' => '/article',
        ],
        'cart/add'             => [
            'request'  => ['items?' => '@cartUpdateParams'],
            'response' => [],
        ],
        'cart/update'          => [
            'request'  => ['items?' => '@cartUpdateParams'],
            'response' => [],
        ],
        'cart/delete'          => [
            'request'  => ['items?' => 'String'],
            'response' => [],
        ],
        'cart/lists'           => [
            'request'  => ['days'],
            'response' => ['list?' => '@cartListByMember'],
        ],
        'city/lists'           => [
            'request'  => ['pid', '@pageParams'],
            'response' => ['list?' => '/city', '@pageInfo'],
        ],
        'index/get'            => [
            'request'  => [],
            'response' => ['ad_list?'      => '/ad_app',
                           'ad_list2?'     => '/ad_app',
                           'ad_list3?'     => '/ad_app',
                           'ad_list4?'     => '/ad_app',
                           'item_list?'    => '/item',
                           'topic_list?'   => '/topic',
                           'article_list?' => '/article',
            ],
        ],
        'invoice/lists'        => [
            'request'  => ['status'],
            'response' => ['list?' => '/invoice', '@pageInfo'],
        ],
        'invoice/get'          => [
            'request'  => ['id'],
            'response' => '/invoice',
        ],
        'item/follow'          => [
            'request'  => ['id'],
            'response' => [],
        ],
        'item/filter'          => [
            'request'  => [],
            'response' => ['brand_list?' => '/item_brand',
                           'price_list?' => '@price_list',
                           'cate_list?'  => '/item_cate',
            ]
        ],
        'item/get'             => [
            'request'  => ['id'],
            'response' => ['info'       => '/item',
                           'like_list?' => '/item',
                           'item_sku?'  => '/item_sku',
            ],
        ],
        'item/get_filter_list' => [
            'request'  => [],
            'response' => ['brand_list?' => '/item_brand',
                           'price_list?' => '@price_list',
                           'cate_list?'  => '/item_cate',
            ],
        ],
        'item/lists'           => [
            'request'  => ['cate_id', 'brand_id', 'prices_section', 'keyword', 'order', 'order_by', 'page', 'perPage'],
            'response' => ['list?' => '/item', '@pageInfo']
        ],
        'item/like'            => [
            'request'  => ['item_id'],
            'response' => [],
        ],
        'item/unlike'          => [
            'request'  => ['item_id'],
            'response' => [],
        ],
        'item_cate/lists'      => [
            'request'  => ['pid'],
            'response' => ['list?' => '/item_cate']
        ],
        'item_comment/lists'   => [
            'request'  => ['item_id', 'is_img', 'order', 'order_by', 'page', 'perPage'],
            'response' => ['list?' => '/item_comment', '@pageInfo', 'total', 'img_total', 'txt_total']
        ],
        'item_comment/add'     => [
            'request'  => ['info' => '/item_comment'],
            'response' => []
        ],
        'item_comment/like'    => [
            'request'  => ['id'],
            'response' => []
        ],
        'item_comment/delete'  => [
            'request'  => ['id'],
            'response' => []
        ],
        'message/lists'        => [
            'request'  => ['@pageParams'],
            'response' => ['list?' => '/message', '@pageInfo'],
        ],
        'order/add'            => [
            'request'  => ['items?' => 'Integer', 'quan_id', 'exress_type', 'pays', 'score',
                'addr_tele', 'addr_name', 'addr_province', 'addr_city', 'addr_area',
                'addr_address', 'addr_zipcode', 'invoice_status', 'invoice_type', 'invoice_title',
                'invoice_info', 'invoice_tax', 'invoice_address', 'invoice_tele',
                'invoice_bank', 'invoice_account', 'invoice_info', 'remark'],
            'response' => '/order'
        ],
        'order/delete'         => [
            'request'  => ['id'],
            'response' => [],
        ],
        'order/get'            => [
            'request'  => ['id'],
            'response' => '/order'
        ],
        'order/get_order_fee'  => [
            'request'  => ['info?' => '@get_order_fee_params'],
            'response' => []
        ],
        'order/lists'          => [
            'request'  => ['uid', 'status', '@pageParams'],
            'response' => ['list?' => '/order', '@pageInfo']
        ],
        'order/orderConfirm'   => [
            'request'  => ['id'],
            'response' => [],
        ],
        'order/pay'            => [
            'request'  => ['id', 'pays_id', 'pays', 'platform'],
            'response' => ['pays', '@wx_pay_result', '@ali_pay_result'],
        ],
        'order/orderClose'     => [
            'request'  => ['id'],
            'response' => [],
        ],
        'order_tele/add'       => [
            'request'  => ['item_id', 'tele'],
            'response' => [],
        ],
        'pres/add'             => [
            'request'  => ['info' => '/pres'],
            'response' => [],
        ],
        'pres/get'             => [
            'request'  => ['id'],
            'response' => '/pres',
        ],
        'pres/lists'           => [
            'request'  => ['@pageParams'],
            'response' => ['list?' => '/pres', '@pageInfo'],
        ],
        'pres/update'          => [
            'request'  => ['info' => '/pres'],
            'response' => [],
        ],
        'pres/delete'          => [
            'request'  => ['id'],
            'response' => [],
        ],
        'quan/add'             => [
            'request'  => ['code', 'item_id', 'type', 'title', 'img', 'stime', 'etime', 'price', 'max', 'man_price', 'man_sale'],
            'response' => []
        ],
        'quan/delete'          => [
            'request'  => ['id'],
            'response' => [],
        ],
        'quan/get'             => [
            'request'  => ['id'],
            'response' => '/quan'
        ],
        'quan/lists'           => [
            'request'  => ['used_uid', 'used_status', 'type', 'order', 'order_by', 'page', 'perPage'],
            'response' => ['list?' => '/quan', '@pageInfo']
        ],
        'quan/exchange_quan'   => [
            'request'  => ['code'],
            'response' => ['id'],
        ],
        'sms/send_verify_code' => [
            'request'  => ['tele'],
            'response' => ['code'],
        ],
        'user/avatar'          => [
            'request'  => ['file'],
            'response' => [],
        ],
        'user/exist'           => [
            'request'  => ['tele'],
            'response' => [],
        ],
        'user/get'             => [
            'request'  => ['id'],
            'response' => '/user',
        ],
        'user/login'           => [
            'request'  => ['tele', 'password', 'keyid', 'type'],
            'response' => '/user'
        ],
        'user/other_set'       => [
            'request'  => ['type', 'info'],
            'response' => [],
        ],
        'user/register'        => [
            'request'  => ['tele', 'password', 'keyid', 'type', 'username'],
            'response' => '/user',
        ],
        'user/resetPassword'   => [
            'request'  => ['oldpassword', 'newpassword', 'tele', 'type'],
            'response' => [],
        ],
        'user/update'          => [
            'request'  => ['/user'],
            'response' => '/user',
        ],
        'user_address/add'     => [
            'request'  => ['province', 'city', 'area', 'province_id', 'city_id', 'area_id', 'address', 'zipcode', 'tele', 'name', 'remark', 'is_default', 'country'],
            'response' => [],
        ],
        'user_address/update'  => [
            'request'  => ['id', 'province', 'city', 'area', 'province_id', 'city_id', 'area_id', 'address', 'zipcode', 'tele', 'name', 'remark', 'is_default', 'country'],
            'response' => [],
        ],
        'user_address/lists'   => [
            'request'  => ['country', 'order', 'order_by', 'page', 'perPage'],
            'response' => ['list?' => '/user_address', '@pageInfo'],
        ],
        'user_address/get'     => [
            'request'  => ['id'],
            'response' => [],
        ],
        'user_address/delete'  => [
            'request'  => ['id'],
            'response' => [],
        ],
        'user_bind/callback'   => [
            'request'  => ['type', 'keyid', 'nickname', 'img'],
            'response' => '/user',
        ],
        'user_favs/add'        => [
            'request'  => ['item_id'],
            'response' => [],
        ],
        'user_favs/delete'     => [
            'request'  => ['item_id'],
            'response' => [],
        ],
        'user_favs/lists'      => [
            'request'  => ['order', 'order_by', 'page', 'perPage'],
            'response' => ['list?' => '/user_favs', '@pageInfo'],
        ],
        'user_like/add'        => [
            'request'  => ['item_id'],
            'response' => [],
        ],
        'user_like/delete'     => [
            'request'  => ['item_id'],
            'response' => [],
        ],
    ]
];